ImportBuddy Log Cleaning improvements#30
Merged
Conversation
…information from them The debug file path, drive name, and .MakeMKV path are redacted from MSG 1004, 2003, and 3338. Additionally, the drive name and letter are redacted from DRV log entries, and the disc name is redacted from all unused drives.
Linux filesystems are typically case-sensitive, so having consistent case is necessary on most systems.
Since previously MessageLogLine.Parse was doing a naïve string.Split on a comma, log entries that contained a comma in the template string or in an argument got broken down incorrectly. Borrowed from a similar project, CsvEnumerator correctly keeps quoted strings together, only splitting outside of such a string. This may also be helpful in other log parsers in ImportBuddy.
lfoust
reviewed
Nov 11, 2024
Collaborator
lfoust
left a comment
There was a problem hiding this comment.
Thanks for taking care of this. A very thorough job. Just a couple of small comments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Instead of stripping all MSG and DRV log entries, ImportBuddy now redacts log entries as described in #27. Right now, any known potentially sensitive information is replaced by "redacted by ImportBuddy". Let me know if the message should change, or if the redaction needs to be more/less aggressive.
This necessitated a change in MSG log parsing, as lines including a
,character in the message template or any message argument broke the parser since it was a simplestring.Split(','). To fix this, I wrote/addedCsvEnumerator, which is capable of parsing the comma-separated values while also taking into account quoted strings and escaped characters.Additionally, the casing of the Linux appsettings file path was corrected.